//
//  main.m
//  Demo0021
//
//  Created by zTercel on 13-3-2.
//  Copyright (c) 2013年 zTercel. All rights reserved.
//

#import <Foundation/Foundation.h>

#define NUMOBJ(value)  [NSNumber numberWithInteger:value]

int main(int argc, const char * argv[])
{
    @autoreleasepool {
        NSArray* array = [NSArray arrayWithObjects: NUMOBJ(100), NUMOBJ(122), NUMOBJ(100), NUMOBJ(1000), NUMOBJ(123), NUMOBJ(121), nil];
        NSCountedSet* set = [NSCountedSet setWithArray:array];
        
        for (id value in set) {
            NSLog(@"%@      count: %lu", value, [set countForObject:value]);
        }
    }
    return 0;
}

